<?php
$js = <<<js
    $(function(){
        $("#ssearchBtn").click(function(){
            var searchKeyword = $.trim($("#ssearchTxt").val());
            if(searchKeyword != ''){
                window.location.href = '/search/?keyword='+searchKeyword;
            }
        });
    
        $('#ssearchTxt').keydown(function(e){
            if(e.keyCode==13){
                var searchKeyword = $.trim($("#ssearchTxt").val());
                if(searchKeyword != ''){
                    window.location.href = '/search/?keyword='+searchKeyword;
                }
            }
        });
    });
js;

$this->registerJs($js)
?>
<div class="r_search"><input id="ssearchTxt" type="text" class="txt" placeholder="搜索明星" /><input id="ssearchBtn" type="button" class="btn" value="GO" /></div>
